//
//  QDMetroBaseHeaderView.m
//  QDMetroClient
//
//  Created by YueWen on 2018/12/28.
//  Copyright © 2018 YueWen. All rights reserved.
//

#import "QDMetroBaseHeaderView.h"

@interface QDMetroBaseHeaderView()

/// contentView的实质视图
@property (nonatomic, strong) UIView *containerView;

@end

@implementation QDMetroBaseHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        self.backgroundColor = RITLColorFromIntRBG(100, 181, 116);
        
        self.containerView = ({
            
            UIView *view = [UIView new];
            view.backgroundColor = UIColor.whiteColor;
            view.layer.cornerRadius = 6;
            
            view;
        });
        
        [self addSubview:self.containerView];
        
        [self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.offset(/*4*/0);
            make.left.offset(20);
            make.right.inset(20).priorityHigh();
        }];
    }
    
    return self;
}



- (UIView *)contentView {
    return self.containerView;
}


@end
